/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author kaibiibrahim
 */
@Embeddable

public class LignCmdPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "id_cmd")
    private int idCmd;
    @Basic(optional = false)
    @Column(name = "id_pdt")
    private int idPdt;
    @Basic(optional = false)
    @Column(name = "is_calc")
    private short isCalc;
 

    public LignCmdPK() {
    }

    public LignCmdPK(int idCmd, int idPdt, short isCalc) {
        this.idCmd = idCmd;
        this.idPdt = idPdt;
        this.isCalc = isCalc;
    }

    public int getIdCmd() {
        return idCmd;
    }

    public void setIdCmd(int idCmd) {
        this.idCmd = idCmd;
    }

    public int getIdPdt() {
        return idPdt;
    }

    public void setIdPdt(int idPdt) {
        this.idPdt = idPdt;
    }

    public short getIsCalc() {
        return isCalc;
    }

    public void setIsCalc(short isCalc) {
        this.isCalc = isCalc;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idCmd;
        hash += (int) idPdt;
        hash += (int) isCalc;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof LignCmdPK)) {
            return false;
        }
        LignCmdPK other = (LignCmdPK) object;
        if (this.idCmd != other.idCmd) {
            return false;
        }
        if (this.idPdt != other.idPdt) {
            return false;
        }
        if (this.isCalc != other.isCalc) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entity.LignCmdPK[ idCmd=" + idCmd + ", idPdt=" + idPdt + ", isCalc=" + isCalc + " ]";
    }    

    
}
